<template>
<uni-shadow-root class="goods-item-index"><navigator :url="'/pages/goods_detail/index?goods_id='+(item.goods_id)" class="goods_item">
  
  <image class="goods_item_image" :src="item.goods_small_logo || '/static/images/default.png'" mode="aspectFill"></image>
  <view class="goods_item_info">
    
    <view class="goods_item_name">
      {{ item.goods_name }}
    </view>
    <view class="goods_item_price">{{ item.goods_price }}</view>
  </view>
</navigator></uni-shadow-root>
</template>

<script>

global['__wxVueOptions'] = {components:{}}

global['__wxRoute'] = 'goods-item/index'
// components/search/index.js
Component({
  /**
   * 组件的属性列表 - 可以接收到 传递过来的值
   */
  properties: {
    // 组件的 item 属性
    item: {
      // type 属性值的数据类型
      type: Object,
      // value 就是属性默认值
      value: {}
    },
    // 简写方式
    // item: Object
  },
});
export default global['__wxComponents']['goods-item/index']
</script>
<style platform="mp-weixin">
.goods_item {
  display: flex;
  padding: 20rpx;
}
.goods_item_image {
  width: 190rpx;
  height: 190rpx;
  margin-right: 30rpx;
}
.goods_item_info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.goods_item_name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-all;
}
.goods_item_price {
  color: var(--pimaryColor);
}
.goods_item_price::before {
  content: "¥";
  font-size: 80%;
  margin-right: 4rpx;
}
</style>